package com.province.platform.common.enums;

import com.province.platform.common.spi.ErrorCode;

public enum CommonErrorCode implements ErrorCode {
    CONFIG_ERROR("Common-00", "平台配置错误"),
    RUNTIME_ERROR("Common-01", "运行时内部调用错误"),
    SECRET_ERROR("Common-02", "解密出错"),
    PLUGIN_INIT_ERROR("Common-03", "插件初始化错误"),
    PLUGIN_SPLIT_ERROR("Common-04", "插件切分错误");

    private final String code;

    private final String desc;

    private CommonErrorCode(String code, String description) {
        this.code = code;
        this.desc = description;
    }

    @Override
    public String getCode() {
        return this.code;
    }

    @Override
    public String getDesc() {
        return this.desc;
    }

    @Override
    public String toString() {
        return String.format("Code:[%s], Desc:[%s]. ", this.code,
                this.desc);
    }
}
